<!--#
 @version 0.3 (auto-set)
#-->

<!-- Table 'pinghosts' edit -->
<p align=center>
 <a href="?">&lt;&lt;&lt; <#LANG_BACK#></a>
</p>
<table border=0 align=center cellpadding=3>
<form action="?" method="post" enctype="multipart/form-data" name="frmEdit">
[#if OK#]
<tr>
 <td colspan=2 align=center>
  <font color="green"><#LANG_DATA_SAVED#></font>
 </td>
</tr>
[#endif OK#]
[#if ERR#]
<tr>
 <td colspan=2 align=center>
  <font color="red"><#LANG_FILLOUT_REQURED#></font>
 </td>
</tr>
[#endif ERR#]
[#if ID=""#]
<tr>
 <td colspan=2 align=center><b><#LANG_NEW_RECORD#></b></td>
</tr>
[#endif ID#]

<tr>
 <td align=right>
 [#if ERR_TITLE#]<b><font color="red">[#endif#]
 <#LANG_TITLE#>:
 </td>
 <td>
  <input type="text" name="title" value="[#TITLE#]" size="50">
 </td>
</tr>


<!-- HOSTNAME (varchar) -->
<tr>
 <td align=right>
 [#if ERR_HOSTNAME#]<b><font color="red">[#endif#]
 <#LANG_HOSTNAME#>:
 </td>
 <td>
  <input type="text" name="hostname" value="[#HOSTNAME#]">
 </td>
</tr>
<!-- TYPE (select) -->
<tr>
 <td align=right valign=top>
 [#if ERR_TYPE#]<b><font color="red">[#endif#]
 <#LANG_TYPE#>: 
 </td>
 <td>                                           
 <select name="type">
  [#begin TYPE_OPTIONS#]<option value="[#VALUE#]"[#if SELECTED#] selected[#endif#]>[#TITLE#]
  [#end TYPE_OPTIONS#]
 </select>
 </td>
</tr>
[#if TYPE="1"#]
<!-- SEARCH_WORD (varchar) -->
<tr>
 <td align=right>
 [#if ERR_SEARCH_WORD#]<b><font color="red">[#endif#]
 <#LANG_SEARCH_WORD#>:
 </td>
 <td>
  <input type="text" name="search_word" value="[#SEARCH_WORD#]">
 </td>
</tr>
[#endif TYPE#]


<tr>
 <td align=right><#LANG_LINKED_OBJECT#>.<#LANG_PROPERTY#>:</td>
 <td><input type="text" name="linked_object" value="[#LINKED_OBJECT#]" size="20">.<input type="text" name="linked_property" value="[#LINKED_PROPERTY#]" size="20"></td>
</tr>


<!-- SCRIPT_ID_ONLINE (int) -->
<tr>
 <td align=right valign="top">
 [#if ERR_SCRIPT_ID_ONLINE#]<b><font color="red">[#endif#]
 <#LANG_ONLINE_ACTION#>:
 </td>
 <td>

 <input type="radio" name="run_type_online" value="script"[#if SCRIPT_ID_ONLINE!="0"#] checked[#endif#]> <#LANG_SCRIPT#>:
   <select name="script_id_online">
    <option value="0">
    [#begin SCRIPTS#]
        <option value="[#ID#]"[#if ID="<#SCRIPT_ID_ONLINE#>"#] selected[#endif#]>[#TITLE#]
        [#end SCRIPTS#]
   </select>    
   <br>
   <input type="radio" name="run_type_online" value="code"[#if SCRIPT_ID_OFFLINE="0"#] checked[#endif#]> <#LANG_CODE#>:<br>
 [#if ERRORS_ONLINE!=""#]
 <font color='red'>[#ERRORS#]</font><br>
 [#endif ERRORS_ONLINE#]   
 <textarea name="code_online" rows=12 cols=100 class="field span8">[#CODE_ONLINE#]</textarea>

 </td>
</tr>

<!-- SCRIPT_ID_OFFLINE (int) -->
<tr>
 <td align=right valign="top">
 [#if ERR_SCRIPT_ID_OFFLINE#]<b><font color="red">[#endif#]
 <#LANG_OFFLINE_ACTION#>:
 </td>
 <td>

 <input type="radio" name="run_type_offline" value="script"[#if SCRIPT_ID_OFFLINE!="0"#] checked[#endif#]> <#LANG_SCRIPT#>:
   <select name="script_id_offline">
    <option value="0">
    [#begin SCRIPTS#]
        <option value="[#ID#]"[#if ID="<#SCRIPT_ID_OFFLINE#>"#] selected[#endif#]>[#TITLE#]
        [#end SCRIPTS#]
   </select>    
   <br>
   <input type="radio" name="run_type_offline" value="code"[#if SCRIPT_ID_OFFLINE="0"#] checked[#endif#]> <#LANG_CODE#>:<br>
 [#if ERRORS_OFFLINE!=""#]
 <font color='red'>[#ERRORS_OFFLINE#]</font><br>
 [#endif ERRORS_OFFLINE#]   
 <textarea name="code_offline" rows=12 cols=100 class="field span8">[#CODE_OFFLINE#]</textarea>

 </td>
</tr>


<!-- ONLINE_INTERVAL (int) -->
<tr>
 <td align=right>
 [#if ERR_ONLINE_INTERVAL#]<b><font color="red">[#endif#]
 <#LANG_ONLINE_CHECK_INTERVAL#>:
 </td>
 <td>
  <input type="text" name="online_interval" value="[#ONLINE_INTERVAL#]" size="10"> <#LANG_SECONDS#> (0 to use default)
 </td>
</tr>

<!-- OFFLINE_INTERVAL (int) -->
<tr>
 <td align=right>
 [#if ERR_OFFLINE_INTERVAL#]<b><font color="red">[#endif#]
 <#LANG_OFFLINE_CHECK_INTERVAL#>:
 </td>
 <td>
  <input type="text" name="offline_interval" value="[#OFFLINE_INTERVAL#]" size="10"> <#LANG_SECONDS#> (0 to use online interval)
 </td>
</tr>


<tr>
 <td colspan=2 align=center>
 [#if ID!=""#]
 <input type="submit" name="subm" value="<#LANG_SUBMIT#>">
 [#else ID#]
 <input type="submit" name="subm" value="<#LANG_ADD#>">
 [#endif ID#]
 &nbsp;
 <a href="?"><#LANG_CANCEL#></a>
 </td>
</tr>
<input type="hidden" name="id" value="<#ID#>">
<input type="hidden" name="view_mode" value="<#VIEW_MODE#>">
<input type="hidden" name="edit_mode" value="<#EDIT_MODE#>">
<input type="hidden" name="mode" value="update">
</form>

<tr>
 <td align=right valign="top">
  <#LANG_LOG#>:
 </td>
 <td valign="top">
 <a href="#" onClick="$('#eventsLog').toggle();return false;"><#LANG_SHOWHIDE#></a>
 <div id='eventsLog' style="display:none">
  [#LOG#]
 </div>
 </td>
</tr>

</table>
